package org.jackysoft.data;

import java.io.FileNotFoundException;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.Part;

import org.jackysoft.bean.define.TransactionNames;
import org.jackysoft.config.ContextConfig;
import org.jackysoft.entity.base.BaseOption;
import org.jackysoft.entity.base.RootEntity;
import org.jackysoft.query.Order;
import org.jackysoft.query.RunnerQuery;
import org.jackysoft.service.OperationLogService;
import org.jackysoft.service.SecurityRoleNotifyService;
import org.jackysoft.util.FileDownload;
import org.jackysoft.util.Page;
import org.jackysoft.ztree.ZTreeNode;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.core.io.ResourceLoader;
import org.springframework.transaction.annotation.Transactional;


@Transactional(TransactionNames.IBATIS_TRANSACTION)
public abstract class AbstractDataProvider<B extends RootEntity> implements ServiceProvider<B>, ResourceLoaderAware {

	protected ResourceLoader resourceLoader;
	
	@Resource
	protected OperationLogService logService;
	
	@Resource
	protected SecurityRoleNotifyService notifyService;
	
	
	@Resource
	protected ContextConfig context;
	
	public AbstractDataProvider() {
		super();
	}
	
	@Override
	public void setResourceLoader(ResourceLoader arg0) {
		this.resourceLoader = arg0;

	}

	@Override
	public B find(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<B> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<B> findAll(int start, int size) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void remove(B t) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void remove(String id) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void remove(Collection<B> bs) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void removeAll() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void save(B t) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void saveOrUpdate(B b) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void save(Collection<B> ts) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(B t) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(Collection<B> bs) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(String id, Map<String, Object> ps) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public B queryOne(RunnerQuery query) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Page query(RunnerQuery mqc, int start, int rows) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Page query(RunnerQuery query, Order sort, int start, int size) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Page query(RunnerQuery query) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Page pager(int start, int rows) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int count() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int count(RunnerQuery qc) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void upload(Part file, B bean) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void uploads(Part[] files, List<B> beans) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public FileDownload download(String id) throws FileNotFoundException{
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Collection<ZTreeNode> ztree(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Collection<BaseOption> getOptions(RunnerQuery query) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void doOrder(Collection<B> beans) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(long id, Map<String, Object> ps) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void update(int id, Map<String, Object> ps) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<B> queryAll(RunnerQuery query) {
		// TODO Auto-generated method stub
		return null;
	}
	
	
	
	
}